/**
    @file BasicXYchart.h
    @author Maciej Siczek, Przemyslaw Plutecki
*/
#ifndef BASICXYCHART_H
#define BASICXYCHART_H

#include "../basic/Chart.h"
#include "../common/Axis.h"
#include <vector>
#include "../../gui/GlobalChartOptions/GlobalChartOptions.h"

namespace LightChart
{
class BasicXYchart : public Chart
{
public:
    /**
        @brief default constructor
        @param title chart's title
    */
    BasicXYchart(std::string title = "XY chart");
    /**
        @brief Provides information about contained axes outside class.
        @return collection of pointers to contained axes - std::vector<Axis*>
    */
    std::vector<Axis*> get_axes();
    /**
        @var Axis x,y
        @brief Contained axes.
        @see Axis
    */
    Axis x,y;
protected:
    void restoreGlobalSettings(); ///< @brief applies global charts' settings.
private:
    friend class boost::serialization::access;
    template<class Archive> void serialize(Archive & ar, const unsigned int version);
};
template<class Archive> inline void BasicXYchart::serialize(Archive & ar, const unsigned int) {
    ar & boost::serialization::base_object<Chart>(*this);
    ar & x & y;
}
}
#if BOOST_VERSION > 104200
#else
BOOST_CLASS_EXPORT(LightChart::BasicXYchart)
#endif
#endif // BASICXYCHART_H
